import request from '../axios/http'

//获取所有订单
export const all = params => {
    return request({
        url:'/records/all',
        method:'get',
        params
    })
}

//删除订单
export const del = params => {
    return request({
        url:'/records/del',
        method:'post',
        data:params
    })
}

//搜索
export const search = params => {
    return request({
        url:'/records/search',
        method:'get',
        params
    })
}

//修改状态
export const updateStatus = params => {
    return request({
        url:'/records/updateStatus',
        method:'post',
        data:params
    })
}

//通过状态获取
export const byStatus = params => {
    return request({
        url:'/records/byStatus',
        method:'get',
        params
    })
}

//获取各状态数量
export const getCount = params => {
    return request({
        url:'/records/getCount',
        method:'get',
        params
    })
}

//获取数据库中前一周，各天的订单量
export const lastWeekOrders = params => {
    return request({
        url:'/records/lastWeekOrders',
        method:'get',
        params
    })
}
//获取数据库中前一周，各天的订单量金额
export const lastWeekOrdersMoney = params => {
    return request({
        url:'/records/lastWeekOrdersMoney',
        method:'get',
        params
    })
}